<?php
class RekomendasiModel extends CI_Model {	
	 function _construct() {
        parent::_construct();
	 	$this->load->database();
	 }
	
	function saveRecommendation($userid, $movieid){
		$sql = "insert into rekomendasi (USERID, MOVIEID)values($userid, $movieid)";
		$data = $this->db->query($sql);
		return $data;
	}
	
	function getRekomendasi($userid){
		$sql = "select MOVIEID from rekomendasi where USERID = $userid";
		$data = $this->db->query($sql);
		return $data;
	}
	
}
?>